/*
 * Copyright (c) 2008 SQLI http://www.sqli.com/
 * Author: Olivier CARPENTIER
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy 
 * of this software and associated documentation files (the "Software"), to deal in 
 * the Software without restriction, including without limitation the rights to use, 
 * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 
 * Software, and to permit persons to whom the Software is furnished to do so, subject 
 * to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all 
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
using System;
using System.Collections.Generic;
using System.Text;

namespace SQLI.WSS.WebControls.DataSource
{
    /// <summary>
    /// Define the internal way to connect to the web application.
    /// </summary>
    public enum InitialisationMode
    {
        /// <summary>
        /// Use the current SPContext to retrieve the current web app
        /// </summary>
        UseCurrentContext = 0,
        /// <summary>
        /// Use the explicit information as the server url
        /// </summary>
        UseExplicitServerUrl = 1
    }

    /// <summary>
    /// Define the sort way on a field
    /// </summary>
    public enum SortWay
    {
        /// <summary>
        /// Increase
        /// </summary>
        Increase = 0,
        /// <summary>
        /// Decrease
        /// </summary>
        Decrease = 1
    }

    /// <summary>
    /// Operator type for where requests
    /// </summary>
    public enum OperatorType
    {
        /// <summary>
        /// Equal
        /// </summary>
        Equal = 0,
        /// <summary>
        /// NotEqual
        /// </summary>
        NotEqual = 1,
        /// <summary>
        /// LessThan
        /// </summary>
        LessThan = 2,
        /// <summary>
        /// MoreThan
        /// </summary>
        MoreThan = 3,
        /// <summary>
        /// LessThanEqual
        /// </summary>
        LessThanEqual = 4,
        /// <summary>
        /// MoreThanEqual
        /// </summary>
        MoreThanEqual = 5,
        /// <summary>
        /// StartWith
        /// </summary>
        StartWith = 6,
        /// <summary>
        /// Contains
        /// </summary>
        Contains = 7
    }

    /// <summary>
    /// AND or OR relation
    /// </summary>
    public enum Relation
    {
        /// <summary>
        /// AND
        /// </summary>
        AND = 0,
        /// <summary>
        /// OR
        /// </summary>
        OR = 1
    }

    /// <summary>
    /// Type of parameters for a where parameter
    /// </summary>
    public enum ParameterType
    {
        /// <summary>
        /// Value
        /// </summary>
        Value = 0,
        /// <summary>
        /// Control
        /// </summary>
        Control = 1,
        /// <summary>
        /// Cookie
        /// </summary>
        Cookie = 2,
        /// <summary>
        /// Form
        /// </summary>
        Form = 3,
        /// <summary>
        /// Profil
        /// </summary>
        Profil = 4,
        /// <summary>
        /// QueryString
        /// </summary>
        QueryString = 5,
        /// <summary>
        /// Session
        /// </summary>
        Session = 6
    }
}
